import { request } from '@/service/request';

/** 获取人脸核验配置列表 */
export function fetchGetIdentityConfigList(params?: Api.Business.IdentityConfigSearchParams) {
  return request<Api.Business.IdentityConfigList>({
    url: '/identity_config/getAll',
    method: 'post',
    data: params
  });
}

/** 新增人脸核验配置 */
export function fetchCreateIdentityConfig(data: Api.Business.IdentityConfigOperateParams) {
  return request<boolean>({
    url: '/identity_config/add',
    method: 'post',
    headers: {
      isEncrypt: true,
      repeatSubmit: false
    },
    data
  });
}

/** 修改人脸核验配置 */
export function fetchUpdateIdentityConfig(data: Api.Business.IdentityConfigOperateParams) {
  return request<boolean>({
    url: '/identity_config/update',
    method: 'post',
    data
  });
}
